package MathCore;

public class Symbol extends Lexeme
{
	public static final int LEFT_BRACE=0, RIGHT_BRACE=1, LEFT_LIST=3, RIGHT_LIST=4, COMMA=5, DOT=6;
	private int type = -1;

	public Symbol(int type)
	{
		this.type = type;
	}

	public Symbol(Symbol original)
	{
		type = original.type;
	}

	public int getType()
	{
		return type;
	}

	public String toString()
	{
		switch(type)
		{
			case LEFT_BRACE:
				return "(";

			case RIGHT_BRACE:
				return ")";

			case LEFT_LIST:
				return "[";

			case RIGHT_LIST:
				return "]";

			case COMMA:
				return ",";

			case DOT:
				return ".";
		}

		return "";
	}

	public Lexeme clone()
	{
		return new Symbol(this);
	}

}
